<template>
  <div style="margin-top:30px">
    <el-form ref="form" :model="form" label-width="100px" :disabled="true">
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="名称" style="margin-right:15px">
              <el-input v-model="form.name" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="App大小" style="margin-right:15px">
              <el-input v-model="form.size" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="App类型" style="margin-right:15px">
              <el-select v-model="form.type" placeholder="请选择">
                <el-option label="司机端" value="tmsDriver"></el-option>
                <el-option label="入驻商端" value="tmsShipper"></el-option>
              </el-select>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="App版本" style="margin-right:15px">
              <el-input v-model="form.version" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="自动更新" style="margin-right:15px">
              <el-radio-group v-model="form.openUpdate">
                <el-radio :label="1">开启</el-radio>
                <el-radio :label="0">关闭</el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="强制更新" style="margin-right:15px">
              <el-radio-group v-model="form.forceUpdate">
                <el-radio :label="1">开启</el-radio>
                <el-radio :label="0">关闭</el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="更新内容" style="margin-right:15px">
              <el-input type="textarea" v-model="form.content" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="下载链接" style="margin-right:15px">
              <el-input v-model="form.link" :disabled="true">
                <el-link slot="append" type="primary" :href="form.link" :underline="false" target="_blank">
                  <el-button type="primary" v-model="form.link" style="cursor: pointer !important;">下载APP</el-button>
                </el-link>
              </el-input>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="二维码" style="margin-right:15px">
              <el-image style="width: 200px; height: 200px" :src="form.qrCode"></el-image>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import Vue from "vue";
import "xe-utils";
import VXETable from "vxe-table";
import "vxe-table/lib/index.css";
import { AppUploadDetails } from "@/api/statistics";
Vue.use(VXETable);
export default {
  name: "partyGroupConfigDetail",
  data() {
    return {
      emptyForm: {},
      form: {
        id: "",
        name: "",
        type: "",
        size: "",
        sha1: "",
        link: "",
        qrCode: "",
        version: "",
        openUpdate: "",
        forceUpdate: "",
        content: "",
      }
    };
  },
  created() {
    //保存空表单对象
  },
  methods: {
    // 获取页面信息
    getInfo(id) {
      AppUploadDetails(id).then(response => {
        this.form = response.data;
        this.loading = false;
      });
    },
    //取消
    funcCancel() {
      this.$emit("fatherCancelMethod", "edit");
    }
  }
};
</script>
<style lang="scss" scoped>
.dialog-footer {
  margin: 15px 0 15px 0;
  width: 175px;
  float: right;
}
.el-select {
  width: 100%;
}
.el-date-editor {
  width: 100%;
}
</style>

